<?php
	session_start();
	require_once 'LoginView.php';
	require_once 'LoginHandler.php';
	
	$handler = new LoginHandler();
	$login = new LoginView();
	$body = "";
	$title = "PHP - Tomas";

	
	if($login->TriedToLogin())
	{
		$body .= $login->DoLogoutBox();
		$body .= $login->GetUserName() . $login->GetPassword();
		$body .= "<p id='status'>InLoggad </p>";
		$body .= $handler->Test();
	}
	else
	{

		$body .= $login->DoLoginBox();
		$body .= "<p id='status'>Ej InLoggad </p>";

	}
?>
<!doctype html>
<html lang="sv">

<head>
    <title><?php print($title); ?></title>
    <meta charset="UTF-8">
    <link href='http://fonts.googleapis.com/css?family=Orbitron' rel='stylesheet' type='text/css'>
    <link rel="stylesheet" href="css/style.css" type="text/css" />

</head>
	<body>
			<div id="container">	
				<div id="content">

					<img src="pics/playloud.jpg" alt="loud" id="loud">
	
					<?php
					print($body);
					?>
					</div>
					
					<!-- p id="date">Current Date: <?php print (Date("l F d, Y")); ?> </p -->
		 		</div>
		 	</div>
		 	<script src="javascript/hide.js" type="text/javascript"> </script>
	</body>
</html>